package com.aoorey.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.aoorey.service.MQProducer;

/**
 * @author Lujx 🐯 🐶 🐼 🦁 ✨
 * @date 创建时间：2017年5月3日
 */
@Controller
@RequestMapping("/testRabbit")
public class TestController {
	final String queue_key = "test_queue_key";

	@Autowired
	MQProducer mqProducer;

	@RequestMapping("/send")
	public void send() {
		Map<String, Object> msg = new HashMap<String, Object>();
		msg.put("data", "hello,rabbmitmq!");
		mqProducer.sendDataToQueue(queue_key, msg);

	}
}
